package com.xsr;

import com.xsr.mapper.UserMapper;
import com.xsr.pojo.User;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * @author 邢式瑞
 * @version 1.0
 * @project gp14Sm
 * @date 2022/9/6 17:15
 */
public class test {
    @Test
    public void show(){
        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserMapper bean = classPathXmlApplicationContext.getBean(UserMapper.class);
        List<User> users = bean.SelectAll();
        for (User user : users) {
            System.out.println(user);
        }
    }
}
